Skip to content

doc: w3n query#261

Merged
weichweich merged 5 commits into
masterfrom
aw-w3n-query
Jul 19, 2023
Merged

doc: w3n query#261
weichweich merged 5 commits into
masterfrom
aw-w3n-query

Conversation

@weichweich

Copy link
Copy Markdown
Contributor

fixes https://github.com/KILTprotocol/ticket/issues/2780

  • add query DID by w3n snipped
  • improve w3n release guide (hopefully)

🤖

@weichweich weichweich requested a review from ntn-x2 July 18, 2023 07:28
@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-261.d3oeht7cvddn19.amplifyapp.com

Comment thread docs/develop/01_sdk/02_cookbook/02_web3names/03_release.md Outdated
* **submitterAccount**: The keyring pair of the submitter.
* **signCallback**: The sign extrinsic callback function. This function is used to sign the extrinsic, read more that in [the SignCallback section](../07_signCallback.md).

The function `releaseWeb3Name` uses the KILT SDK to create a *web3name release transaction* using `api.tx.web3Names.releaseByOwner`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right direction to go? We would not be able to catch any of these inconsistencies if the naming changes, at some point. What about adding comments to the code snippet directly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding comments to the code make it less readable. e.g. hard to spot what is actually going on, finding the function calls in between all the comments.
Yes this can get outdated, but I would hope that not only the code example is checked when there is an error, but also the guide where the code is used. 😓

</TsJsBlock>

In the code example above, the `queryDidDocument` function takes a web3Name parameter, which represents the web3name to be resolved.
It internally uses the `api.call.did.queryByWeb3Name` method to query the information of the provided web3name from the blockchain.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@weichweich weichweich merged commit a5fd437 into master Jul 19, 2023
@weichweich weichweich deleted the aw-w3n-query branch July 19, 2023 07:47
Dudleyneedham pushed a commit that referenced this pull request Jul 31, 2023
Co-authored-by: Antonio <antonio@kilt.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants